package com.android.pdd.baseapp.base;

import android.os.Bundle;

import androidx.annotation.Nullable;

import com.lg.meng.base.BaseMvpFragment;

/**
 * Author: xx
 * Date: 2019/11/08
 * Description:
 */
public abstract class BaseFragment extends BaseMvpFragment {
    public BaseActivity activity;

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        activity = (BaseActivity) getActivity();
        super.onActivityCreated(savedInstanceState);

    }

    /**
     * 所有继承BackHandledFragment的子类都将在这个方法中实现物理Back键按下后的逻辑
     * FragmentActivity捕捉到物理返回键点击事件后会首先询问Fragment是否消费该事件
     * 如果没有Fragment消息时FragmentActivity自己才会消费该事件
     */
    public boolean onBackPressed() {
        return false;
    }
}
